<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        .box {
            width: 200px;
            height: 200px;
            background-color: red;
            margin: 10px;
        }
        .show {
            display: block;
        }
        .hide {
            display: none;
        }
    </style>
</head>
<body>

<input type="button" value="隐藏"/>
<div class="box">大爱陈道明！</div>

<script>

    var inp = document.getElementsByTagName("input")[0];
    var box = document.getElementsByClassName("box")[0];

    inp.onclick = function () {
        if(this.value == "隐藏"){
            box.className += " hide";
            this.value = "显示";
        }else{
            box.className = "box";
            this.value = "隐藏";
        }
    }


</script>


</body>
</html>